package by.home;

import java.io.Serializable;
import java.util.Date;

public class Message implements Serializable {

  private int id;
  private int authorId;
  private Date date;
  private int chatRoomId;
  private ChatRoom chatRoom;
  private String content;
  private int version;
  private User author;

  public Message() {
  }

  public Message(int authorId, int chatRoomId) {
    this.date = new Date();
    this.chatRoomId = chatRoomId;
    this.authorId = authorId;
  }

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public int getAuthorId() {
    return authorId;
  }

  public void setAuthorId(int authorId) {
    this.authorId = authorId;
  }

  public Date getDate() {
    return date;
  }

  public void setDate(Date date) {
    this.date = date;
  }

  public int getChatRoomId() {
    return chatRoomId;
  }

  public void setChatRoomId(int chatRoomId) {
    this.chatRoomId = chatRoomId;
  }

  public ChatRoom getChatRoom() {
    return chatRoom;
  }

  public void setChatRoom(ChatRoom chatRoom) {
    this.chatRoom = chatRoom;
  }

  public String getContent() {
    return content;
  }

  public void setContent(String content) {
    this.content = content;
  }

  public int getVersion() {
    return version;
  }

  public void setVersion(int version) {
    this.version = version;
  }

  public User getAuthor() {
    return author;
  }

  public void setAuthor(User author) {
    this.author = author;
  }
}
